-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add probability field calc and plots #127
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #127 +/- ##
==========================================
- Coverage 21.29% 20.80% -0.49%
==========================================
Files 28 28
Lines 3762 3850 +88
==========================================
Hits 801 801
- Misses 2961 3049 +88 ☔ View full report in Codecov by Sentry. |
if minimum_allowable_value is not None: | ||
too_small = (training_set + training_set['depth']).values < minimum_allowable_value | ||
training_set.values[too_small] = numpy.nan | ||
training_set = numpy.fmax(training_set, -training_set['depth']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WPringle could the difference in the model vs surrogate be how/when we adjust?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. What was the min_depth set and what are the depths in the SCHISM model on the overland points that get wet from NWM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the mindepth is 0.01
, I need to check the depths on the overland... I'll get back to you on that. In the meantime, can you please also take a look at the newly added code as a whole and see if you spot any obvious/conceptual mistakes or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WPringle minimum allowable depth is set to 0.8 * h0
which is 0.8 * 0.01
. The depths that are set as being too small are:
too_small = (maxelev+ depths).values < min_depth
These nodes are set to nan
in the latest version of the code; in an earlier version, these values would then be set to be equal to -depth
which resulted in the earlier plots above
Looking at the max
and min
of the depths and maxelev of the too_small
region show:
depths[too_small.any(axis=0)].min(), depths[too_small.any(axis=0)].max(), depths[too_small.any(axis=0)].mean()
# (-44.28715, -0.01106, -5.5330863)
maxelev[too_small].min(), maxelev[too_small].max(), maxelev[too_small].mean()
# (0.010003523, 44.07152, 5.2620897)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can see the computation of the probabilities of exceedance makes sense.
Only request change for figure title from "comparison of probability fields at level: {lvl}"
to "Probability of water level exceeding {lvl}-m" or something similar
@WPringle swapping the order of set small elev to null and set null to depth for model calculation, (i.e. EnsemblePerturbation/ensembleperturbation/uncertainty_quantification/surrogate.py Lines 676 to 678 in 4d82917
and EnsemblePerturbation/ensembleperturbation/uncertainty_quantification/surrogate.py Line 679 in 4d82917
) resulted in these plots: I think it might make more sense to keep the swapped version. What do you think? |
No description provided.